package alipay

import (
	"jlpay-sdk-go/pkg/jlpay/core"
	"jlpay-sdk-go/pkg/jlpay/models/openmerch/alipay"
	"jlpay-sdk-go/pkg/jlpay/services"
)

// AlipayService 开放商户支付宝服务
type AlipayService struct {
	*services.BaseService
}

// NewAlipayService 创建支付宝服务实例
func NewAlipayService(config *core.Config) *AlipayService {
	return &AlipayService{
		BaseService: services.NewBaseService(config),
	}
}

// QueryRealnameAli 查询支付宝实名认证信息
func (s *AlipayService) QueryRealnameAli(request *alipay.RealnameAliQueryRequest) (*alipay.RealnameAliQueryResponse, error) {
	response := alipay.NewRealnameAliQueryResponse()
	err := s.Post(request, response, "/open/merch/access/alipay/realname/query")
	return response, err
}
